package xuegao.study.mall.admin.feign;

import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import xuegao.study.mall.common.api.CommonResult;
import xuegao.study.mall.common.ms.SeckillRequest;

@FeignClient(contextId = "ms", name = "study-web-service", path = "/portal/api")
public interface MsClient {

    @ApiOperation("获取秒杀商品列表")
    @GetMapping("/items")
    CommonResult getItems();

    @ApiOperation("商品秒杀")
    @PostMapping("/seckill")
    CommonResult seckill(@RequestBody SeckillRequest request);
}
